package com.citasgoo.common;

import java.io.Serializable;

public class Json implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private boolean isSuccess = true;

    private Object data;

    private String errCode;

    private String errMsg;

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean isSuccess) {
        this.isSuccess = isSuccess;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    @Override
    public String toString() {
        return "Json [isSuccess=" + isSuccess + ", data=" + data + ", errCode=" + errCode + ", errMsg=" + errMsg + "]";
    }

    public Json(String errCode, String errMsg) {
        super();
        this.isSuccess = false;
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public Json(Object data) {
        super();
        this.isSuccess = true;
        this.data = data;
    }

    public Json() {
        super();
        this.isSuccess = true;
    }

}
